START_OF_RAM          = $200

PPU_CONTROL_REG1      = $2000
PPU_CONTROL_REG2      = $2001
PPU_STATUS_REG        = $2002
SPR_RAM_ADDRESS_REG   = $2003
SPR_RAM_IO_REG        = $2004
BG_SCROLL_REG         = $2005
VRAM_ADDRESS_REG      = $2006
VRAM_IO_REG           = $2007

PAPU_P1_CONTROL_REG1  = $4000
PAPU_P1_CONTROL_REG2  = $4001
PAPU_P1_FREQ_REG1     = $4002
PAPU_P1_FREQ_REG2     = $4003
PAPU_P2_CONTROL_REG1  = $4004
PAPU_P2_CONTROL_REG2  = $4005
PAPU_P2_FREQ_REG1     = $4006
PAPU_P2_FREQ_REG2     = $4007
PAPU_T_CONTROL_REG1   = $4008
PAPU_T_CONTROL_REG2   = $4009
PAPU_T_FREQ_REG1      = $400a
PAPU_T_FREQ_REG2      = $400b
PAPU_N_CONTROL_REG1   = $400c
PAPU_N_CONTROL_REG2   = $400d
PAPU_N_FREQ_REG1      = $400e
PAPU_N_FREQ_REG2      = $400f
PAPU_DMC_CONTROL_REG  = $4010
PAPU_DMC_VOLUME_REG   = $4011
PAPU_DMC_ADDRESS_REG  = $4012
PAPU_DMC_FREQ_REG2    = $4013

SPR_RAM_DMA_REG       = $4014

PAPU_STATUS_REG       = $4015

JOYPAD1_REG           = $4016
JOYPAD2_REG           = $4017

MMC5_PRG_MODE         = $5100
MMC5_CHR_MODE         = $5101
MMC5_PRG_RAM_PROT_1   = $5102
MMC5_PRG_RAM_PROT_2   = $5103
MMC5_EXRAM_MODE       = $5104
MMC5_NTABLE_MAP       = $5105
MMC5_FILL_MODE_TILE   = $5106
MMC5_FILL_MODE_COLOR  = $5107

MMC5_PRG_RAM_BANK     = $5113
MMC5_PRG_BANK_0       = $5114
MMC5_PRG_BANK_1       = $5115
MMC5_PRG_BANK_2       = $5116
MMC5_PRG_BANK_3       = $5117

MMC5_SPR_CHR_BANK_0   = $5120
MMC5_SPR_CHR_BANK_1   = $5121
MMC5_SPR_CHR_BANK_2   = $5122
MMC5_SPR_CHR_BANK_3   = $5123
MMC5_SPR_CHR_BANK_4   = $5124
MMC5_SPR_CHR_BANK_5   = $5125
MMC5_SPR_CHR_BANK_6   = $5126
MMC5_SPR_CHR_BANK_7   = $5127
MMC5_BKGRD_CHR_BANK_0 = $5128
MMC5_BKGRD_CHR_BANK_1 = $5129
MMC5_BKGRD_CHR_BANK_2 = $512a
MMC5_BKGRD_CHR_BANK_3 = $512b

MMC5_UPPER_CHR_BANK   = $5130

MMC5_VERT_SPLIT_MODE  = $5200
MMC5_VERT_SPLIT_SCRL  = $5201
MMC5_VERT_SPLIT_BANK  = $5202
MMC5_IRQ_COUNTER      = $5203
MMC5_IRQ_STATUS       = $5204
MMC5_MULTI_1          = $5205
MMC5_MULTI_2          = $5206

MMC5_EXRAM            = $5c00
MMC5_EXRAM_END        = $5fff

; Video (PPU) RAM Addresses.
PPU_PATTERN_TABLE_0   = $0000
PPU_PATTERN_TABLE_1   = $1000
PPU_NAME_TABLE_0      = $2000
PPU_ATTRIBUTE_TABLE_0 = $23C0
PPU_NAME_TABLE_1      = $2400
PPU_ATTRIBUTE_TABLE_1 = $27C0
PPU_NAME_TABLE_2      = $2800
PPU_ATTRIBUTE_TABLE_2 = $2bc0
PPU_NAME_TABLE_3      = $2c00
PPU_ATTRIBUTE_TABLE_3 = $2fc0
PPU_UNUSED            = $3000
PPU_IMAGE_PALETTE_1   = $3f00
PPU_SPRITE_PALETTE_1  = $3f10
PPU_PALETTE_MIRROR    = $3f20

COLOR_BLACK_CODE             = $0f
COLOR_WHITE_CODE             = $20
COLOR_RED_CODE               = $06
COLOR_CYAN_CODE              = $21
COLOR_PURPLE_CODE            = $04
COLOR_GREEN_CODE             = $19
COLOR_BLUE_CODE              = $03
COLOR_YELLOW_CODE            = $39
COLOR_ORANGE_CODE            = $18
COLOR_BROWN_CODE             = $08
COLOR_PINK_CODE              = $26
COLOR_DARK_GREY_CODE         = $2d
COLOR_GREY_CODE              = $00
COLOR_LIGHT_GREEN_CODE       = $3a
COLOR_LIGHT_BLUE_CODE        = $22
COLOR_LIGHT_GREY_CODE        = $10

SCREEN_CHAR_WIDTH     = 32
SCREEN_CHAR_HEIGHT    = 30

NUMBER_OF_HARDWARE_SPRITES = 64
HARDWARE_SPRITE_WIDTH      = 8
HARDWARE_SPRITE_HEIGHT     = 8
BYTES_PER_HARDWARE_SPRITE  = 4

NUMBER_OF_COLORS_PER_PALETTE_ENTRY = 4
NUMBER_OF_ENTRIES_PER_PALETTE      = 4
